import { translateByCode } from '@/lib/getTransData.js';
import validator from '../index.js';
import { DraftCreateDto } from '@/lib/form/swaggerForm';
// 写通知验证
export class DraftCreateDto_Rules extends DraftCreateDto {
  constructor() {
    super();
    this.title = [
      validator.required(translateByCode('rules.title'))
    ];
    this.targetIdList = [
      {
        type: 'array',
        required: true,
        message: translateByCode('rules.people'),
        trigger: 'blur'
      }
    ];
    this.message = [
      // {
      //   required: true,
      //   message: '通知内容不能为空',
      //   trigger: 'change'
      // }
      validator.required(translateByCode('rules.message'))
    ];
  }
}
